//第五套
// class Food {
//     id: number = 0
//     name: string = ''
//     description: string = ''
//     hot: number = 0
//     icon: string = ''
//     price: number = 0
//     constructor(id: number, name: string, description: string
//         , hot: number, icon: string, price: number) {
//         this.id = id
//         this.name = name
//         this.description = description
//         this.hot = hot
//         this.icon = icon
//         this.price = price
//     }
//     getDescription(): string {
//         return "菜品描述:" + this.description;
//     }
// }
// let foodsList: Food[] = [
//     new Food(1, '烤鸭', '烤鸭是北京和南京的一道特色名菜,属于北京菜或金陵菜,该菜品以色泽红艳,肉质细嫩,味道醇厚,肥而不腻的特色,被誉为“天下美味”而驰名中外,其色泽略黄,柔软淡香,夹卷其他荤素食物食用,为宴席常用菜点,更是家常风味美食。', 2, '/app16/images/1.png', 88.5),
//     new Food(2, '回锅肉', '回锅肉，是一种四川传统菜式中家常（味型）菜肴的代表菜肴之一，属于川菜系列。制作原料主要有猪后臀肉（二刀肉）、青椒、蒜苗等，口味独特，色泽红亮，肥而不腻。回锅肉起源四川农村地区。古代时期称作油爆锅，四川地区大部分家庭都会制作。所谓回锅，就是再次烹调的意思。', 0, '/app16/images/2.png', 12.5),
//     new Food(3, '油淋茄子', '油淋茄子以茄子、鸡蛋、肉末、粉丝等为食材制成的一道精美的平民美食。', 0, '/app16/images/3.png', 20.5),
//     new Food(4, '宫保鸡丁', '宫保鸡丁选用鸡肉为主料，佐以花生米、辣椒等辅料烹制而成；红而不辣、辣而不猛、香辣味浓、肉质滑脆；其入口鲜辣，鸡肉的鲜嫩可以配合花生的香脆。', 2, '/app16/images/4.png', 34.5),

// ]
// console.log(foodsList);



//第六套
class Food {
    id: number = 0
    foodId: number = 0
    userId: number = 0
    content: string = ''
    postDate: string = ''
    constructor(id: number, foodId: number,
        userId: number, content: string, postDate: string) {
        this.id = id
        this.foodId = foodId
        this.userId = userId
        this.content = content
        this.postDate = postDate

    }
    getContent(): string {
        return "评论内容:" + this.content;
    }
}
let foodCommentsList: Food[] = [
    new Food(1, 1, 1, '烤鸭非常好吃', '2024-09-09'),
    new Food(2, 1, 1, '烤鸭色泽红艳,肉质细嫩,味道醇厚,肥而不腻！', '2024-09-09'),
    new Food(3, 2, 2, '回锅肉，口味独特，色泽红亮，肥而不腻!', '2024-09-10'),
    new Food(4, 2, 1, '回锅肉，川菜精品，值得品尝！', '2024-09-11'),

]
console.log(foodCommentsList);




//第七套
class WeightRecord {
    id: number = 0
    userId: number = 0
    weight: number = 0
    weightDate: string = ''

    constructor(id: number, userId: number, weight: number, weightDate: string) {
        this.id = id
        this.userId = userId
        this.weight = weight
        this.weightDate = weightDate
    }
    getWeight(): number {
        return this.weight;
    }
}
let weightRecordsList: WeightRecord[] = [
    new WeightRecord(1, 1, 180, '2024-09-12 22:00:25'),
    new WeightRecord(2, 1, 182, '2024-09-18 22:00:53'),
    new WeightRecord(3, 1, 175, '2024-09-30 12:19:44'),
    new WeightRecord(4, 2, 178, '2024-10-21 12:19:44'),


]
console.log(weightRecordsList);